home *** CD-ROM | disk | FTP | other *** search
- #include <Dialogs.h>
- #include <OSUtils.h>
- #include <Memory.h>
- #include <OSEvents.h>
- #include <Fonts.h>
- #include <Menus.h>
-
- SysEnvRec TheWorld;
- Boolean WNE_available;
-
- #define _Unimplemented 0xA89F
- #define _WaitNextEvent 0xA860
-
- Boolean TrapAvailable ( tNum, tType)
- short tNum;
- short tType;
- {
- return ( NGetTrapAddress(tNum,tType) != GetTrapAddress(_Unimplemented) );
- }
-
- Boolean WNEIsImplemented()
- {
- if (TheWorld.machineType < 0)
- {
- return false;
- }
- else
- {
- return TrapAvailable ( _WaitNextEvent, ToolTrap);
- }
- }
-
- void InitToolBox(int numberOfMasters)
- {
-
- InitGraf(&qd.thePort);
- InitFonts();
- InitWindows();
- InitMenus();
- InitCursor();
- TEInit();
- FlushEvents(everyEvent, 0);
- InitDialogs(nil);
-
- while(numberOfMasters--)
- MoreMasters();
-
- MaxApplZone();
- SysEnvirons(1,&TheWorld);
- WNE_available = WNEIsImplemented();
- }
-